var str = window.location.href
var test = str[str.length-1]

$('#menubtn').click(function(){
  $("#navBar").css({
    backgroundColor:"white",
    position:"absolute",
    width:390,
    zIndex:1000,
  })
})

// function ttt(){
//   $("#serachresult").tab('show')
//   $('#no').css({
//     display:'none'
//   })
// }

// 招商客户搜索
function indexbesiness(){
  var businessword = $("#businessword").val()
  var businesstime1 = $("#businesstime1").val()
  var businesstime2 = $("#businesstime2").val()
  $.ajax({
    url:host + '/indexbesiness?businessword=' + businessword + '&businesstime1=' + businesstime1 + '&businesstime2=' + businesstime2,
    type:'get',
    dataType: "json",  
    data:'',
    success: function(){
      $("#serachresult").tab('show')
    },
    error:function(){
      alert('系统异常，请稍后再试')
    }
  })
}

// 招商媒介搜索
function indexmediumbesiness(){
  var busimediumword = $("#busimediumword").val()
  var busimediumplatform = $("#busimediumplatform").val()
  var busimediumverity = $("#busimediumverity").val()
  var busimediumfens1 = $("#busimediumfens1").val()
  var busimediumfens2 = $("#busimediumfens2").val()
  var busimediumprice1 = $("#busimediumprice1").val()
  var busimediumprice2 = $("#busimediumprice2").val()
  $.ajax({
    url: host + '/indexmediumbesiness?busimediumword=' + busimediumword + 
                '&busimediumplatform=' + busimediumplatform + 
                '&busimediumverity=' + busimediumverity + 
                '&busimediumfens1=' + busimediumfens1 + 
                '&busimediumfens2=' + busimediumfens2 + 
                '&busimediumprice1=' + busimediumprice1 + 
                '&busimediumprice2=' + busimediumprice2 ,
    type:'get',
    dataType: "json",  
    data: '',
    success: function(){
      $("#serachresult").tab('show')
    },
    error:function(){
      alert('系统异常，请稍后再试')
    }
  })
}

// 招商项目搜索
function indexobject(){
  var indexobkeyword = $("#indexobkeyword").val()
  var objectstime1 = $("#objectstime1").val()
  var objectstime2 = $("#objectstime2").val()
  $.ajax({
    url:host + '/indexobject?indexobkeyword=' + indexobkeyword + '&objectstime1=' + objectstime1 + '&objectstime2=' + objectstime2,
    type:'get',
    dataType: "json",  
    data:'',
    success: function(){
      $("#serachresult").tab('show')
    },
    error:function(){
      alert('系统异常，请稍后再试')
    }
  })
}


// // 运营部查询
// function indexobject(){
//   var indexobkeyword = $("#indexobkeyword").val()
//   var objectstime1 = $("#objectstime1").val()
//   var objectstime2 = $("#objectstime2").val()
//   $.ajax({
//     url:host + '/indexbesiness?indexobkeyword=' + indexobkeyword + '&objectstime1=' + objectstime1 + '&objectstime2=' + objectstime2,
//     type:'get',
//     dataType: "json",  
//     data:'objectstime1=' + objectstime1 + '&objectstime2=' + objectstime2,
//     success: function(){
//       $("#serachresult").tab('show')
//     },
//     error:function(){
//       alert('系统异常，请稍后再试')
//     }
//   })
// }